package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.EahelpExt;
@SuppressWarnings("unchecked")
/**
 * eahelp
 */
public class Eahelp {
	/**
	 * HELPID
	 */
	public String hELPID;
	/**
	 * MENUID
	 */
	public String mENUID;
	/**
	 * CONTENT
	 */
	public String cONTENT;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static EahelpExt DB = new EahelpExt(); 
	
	public Eahelp() {
		super();
	}
	
	public Eahelp(String hELPID, String mENUID, String cONTENT) {
		super();
		this.hELPID = hELPID; 
		this.mENUID = mENUID; 
		this.cONTENT = cONTENT; 
	}
	
	public String getHELPID() {
		return hELPID;
	}

	public void setHELPID(String hELPID) {
		this.hELPID = hELPID;
	} 
	
	public String getMENUID() {
		return mENUID;
	}

	public void setMENUID(String mENUID) {
		this.mENUID = mENUID;
	} 
	
	public String getCONTENT() {
		return cONTENT;
	}

	public void setCONTENT(String cONTENT) {
		this.cONTENT = cONTENT;
	} 
	
	
	public Map eahelpToMap() {
		Map map = new HashMap();
		try {
			map.put("hELPID",this.hELPID);
			map.put("mENUID",this.mENUID);
			map.put("cONTENT",this.cONTENT);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Eahelp mapToEahelp(Map map){
		try {
			String hELPID =  map.get("hELPID").toString();
			String mENUID =  map.get("mENUID").toString();
			String cONTENT =  map.get("cONTENT").toString();
			Eahelp eahelp = new Eahelp(hELPID, mENUID, cONTENT);
			return eahelp;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return eahelpToMap().toString();
	}
	
	//方便数据操作	
	public Eahelp insert(){
		return DB.insert(this);
	}
	public Eahelp update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
